package com.javaException.demo;

public class Test2 {

    public static void main(String[] args) {
        try {
            test();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * throws关键字，谁调用该方法，谁就要处理异常或者往上跑抛
     * @throws Exception
     */
    public static void test() throws Exception{
        int[] arr = {1,2,3};
        System.out.println(arr[3]);
    }
}
